﻿Imports System.Data
Imports System.Data.Odbc
Imports WSEntidades
Public Class ResumencortesFact
    Public Shared Function Build(ByVal dr As OdbcDataReader) As ResumencortesBE
        Dim tmpResumencortes As ResumencortesBE = New ResumencortesBE()
        Try
            With tmpResumencortes
                .Caja = convertDTFromDb.ConvertShort(dr.Item("Caja"))
                .Dev = convertDTFromDb.ConvertDecimal(dr.Item("Dev"))
                .Dif = convertDTFromDb.ConvertDecimal(dr.Item("Dif"))
                .Fecha = convertDTFromDb.convertDateTime(dr.Item("Fecha"))
                .Id = convertDTFromDb.convertInt32(dr.Item("Id"))
                .IdEmpresa = convertDTFromDb.ConvertShort(dr.Item("IdEmpresa"))
                .Importe = convertDTFromDb.ConvertDecimal(dr.Item("Importe"))
                .MonEApl = convertDTFromDb.ConvertDecimal(dr.Item("MonEApl"))
                .MonEGen = convertDTFromDb.ConvertDecimal(dr.Item("MonEGen"))
                .NoCorte = convertDTFromDb.ConvertShort(dr.Item("NoCorte"))
                .Recargas = convertDTFromDb.ConvertDecimal(dr.Item("Recargas"))
                .RetiroEf = convertDTFromDb.ConvertDecimal(dr.Item("RetiroEf"))
                .SalDinero = convertDTFromDb.ConvertDecimal(dr.Item("SalDinero"))
                .SaldoAct = convertDTFromDb.ConvertDecimal(dr.Item("SaldoAct"))
                .SaldoCorte = convertDTFromDb.ConvertDecimal(dr.Item("SaldoCorte"))
                .Usr = convertDTFromDb.ConvertString(dr.Item("Usr"))
                .VtasEf = convertDTFromDb.ConvertDecimal(dr.Item("VtasEf"))
                .VtasTb = convertDTFromDb.ConvertDecimal(dr.Item("VtasTb"))
            End With
            Return tmpResumencortes
        Catch ex As Exception
            Throw
        Finally
            tmpResumencortes = Nothing
        End Try
    End Function
End Class
